package com.zh.elec.dao.impl;

import java.util.List;

import com.zh.elec.dao.ProductBatchDao;
import com.zh.elec.dao.base.BaseDao;
import com.zh.elec.model.ProductBatch;

/**
 * 商品批次表
 * @author scy
 *
 */
public class ProductBatchDaoImpl extends BaseDao implements ProductBatchDao {

	@Override
	public Object save(ProductBatch obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object update(ProductBatch obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object getObjById(ProductBatch obj) {
		return this.getObjById(obj);
	}

	@Override
	public Object del(ProductBatch obj) {
		return this.del(obj);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ProductBatch> findByHql(String hql) {
		return this.find(hql);
	}

	@Override
	public List<ProductBatch> findByName(String name, Object value) {
		return this.findByName(name, value);
	}
	
	@Override
	public List<ProductBatch> findAll() {
		return this.findByHql(" from ProductBatch ");
	}

}
